|
CATIA V5 Programmierung : Lizenz ermitteln?
EngineeredByRobberts am 04.05.2010 um 10:55 Uhr (0)
Über CATIA.SystemConfiguration müsste es gehenAus der ‘V5Automation.chm’ :Dim SystemConfiguration1 As SystemConfigurationSet SystemConfiguration1 = CATIA.SystemConfigurationReDim NameArray(SystemConfiguration1.ProductNamesCount)SystemConfiguration1.GetProductNames NameArrayMsgBox "IsProductAuthorized for product " & NameArray(0) & " returns " & SystemConfiguration1.IsProductAuthorized(NameArray(0))------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 17.06.2010 um 16:59 Uhr (0)
Hier ein kleines Beispiel:Option ExplicitLanguage="CATSCRIPT"Sub CATMain()Dim productDocument1 As DocumentDim selection1 As SelectionDim I As IntegerDim TextFile1 As FileDim fileSys As FileSystemDim oStream As TextStreamDim Outputtxt, Tmptxt As StringDim param1 As ParameterSet fileSys = CATIA.FileSystem Set productDocument1 = CATIA.ActiveDocumentOutputtxt = productDocument1.Path & "DeinTextFile.txt"Set TextFile1 = fileSys.CreateFile(Outputtxt, True)Set oStream = TextFile1.OpenAsTextStream("ForWriting")Set ...
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 29.06.2010 um 12:40 Uhr (0)
So wie unten funktioniert es bei mir einwandfrei, ist aber wie oben schon erwähnt nur bei Längen und Winkel so einfach.Sub CATMain()Dim productDocument1 As DocumentDim selection1 As Selection Dim I As Integer Dim TextFile1 As FileDim fileSys As ObjectDim oStream As TextStreamDim Outputtxt, Tmptxt As String Dim param1 As Parameter Set fileSys = CATIA.FileSystemSet productDocument1 = CATIA.ActiveDocumentOutputtxt = productDocum ...
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 29.06.2010 um 15:05 Uhr (0)
du suchst halt jetzt nach Constraints und nicht nach Parameter, deswegen muss der Typ jetzt auf Constraint umgestellt werden.Der If Then Schleife kannst du dich sparen da du schon nach Constraints vom Typ Length gesucht hast.Sub CATMain()Dim productDocument1 As DocumentDim selection1 As Selection Dim I As Integer Dim TextFile1 As FileDim fileSys As ObjectDim oStream As TextStreamDim Outputtxt, Tmptxt As String Dim constraint1 As Constraint ...
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Dokument geöffnet
EngineeredByRobberts am 04.05.2010 um 09:38 Uhr (0)
CATIA.Documents.Count = 0 müsste eigentlich funktionierenedit: Bernd war schneller ------------------- Robert[Diese Nachricht wurde von EngineeredByRobberts am 04. Mai. 2010 editiert.]
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Zeichnungstext / Trennzeichen
EngineeredByRobberts am 15.07.2010 um 16:41 Uhr (0)
Ich vermute das Catia hier auf die Windows Regions- und Sprachoptionen zugreift.We wäre vielleicht mal ein Versuch wert die Windows optionen entsprechen um zu stellen? ------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 29.06.2010 um 12:43 Uhr (0)
ich denke Magnitude ist sprachabhängig und sollte bei dir warscheinlich "länge" anstatt "Length" sein?------------------- Robert[Diese Nachricht wurde von EngineeredByRobberts am 29. Jun. 2010 editiert.]
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : gespiegelte Teile
EngineeredByRobberts am 29.04.2010 um 15:30 Uhr (0)
Ich habe ein bisschen damit rumgespielt, bin aber auch nicht viel weiter gekommen.Assembly-Symmetry ist vom Typ AssemblyFeature und Teil von der Collection ‚AssemblyFeatures’Dim assyFeats1 As AssemblyFeaturesDim assemblyFeat1 As AssemblyFeatureSet productDocument1 = CATIA.ActiveDocumentSet Product1 = productDocument1.ProductSet assyFeats1 = Product1.GetTechnologicalObject("AssemblyFeatures")Aber:‘assyFeats1.Item()’ funktioniert nichtDafür funktioniert ‚assyFeats1.Remove()’ , das Feature wird gelöscht (aber ...
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 23.06.2010 um 16:29 Uhr (0)
Längen und Winkel sind einfach:If TypeName(param1) = "Length" ThenIf TypeName(param1) = "Angle" Then------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 29.06.2010 um 13:13 Uhr (0)
das liegt an der Suche selection1.Search "CATKnowledgeSearch.InternalParameter,all"Längen aus Skizzen findest du zum Beispiel über:selection1.Search "CATSketchSearch.MfLengthConstraint,all"------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CATIA V5 Parameter über Python auslesen
EngineeredByRobberts am 29.06.2010 um 12:57 Uhr (0)
Hab gerade noch mal rumprobiert, und Längen sind vom Typ Length und NUR vom Typ Length und NICHT vom Typ DimensionIf TypeName(param1) = "Length" Then funktioniert einwandfrei, das mit Unit.Magnitude kannst du dich bei Längen sparen------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Lizenz ermitteln?
EngineeredByRobberts am 04.05.2010 um 11:32 Uhr (0)
Womit mal wieder bewiesen ist das man NIE was direkt aus der V5Automation.chm kopieren sollteDim NameArray()Dim SystemConfiguration1 As SystemConfigurationSet SystemConfiguration1 = CATIA.SystemConfigurationReDim NameArray(SystemConfiguration1.ProductCount-1)SystemConfiguration1.GetProductNames NameArrayMsgBox "IsProductAuthorized for product " & NameArray(0) & " returns " & SystemConfiguration1.IsProductAuthorized(NameArray(0))------------------- Robert
|
| In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Lizenz ermitteln?
EngineeredByRobberts am 04.05.2010 um 11:52 Uhr (0)
Als CATScript funktioniert das ganze, mit VB kenn ich mich leider zu wenig ausNeue Version:Option ExplicitLanguage="CATSCRIPT"Sub CATMain()Dim NameArray()Dim SystemConfiguration1 As SystemConfigurationDim I, A As IntegerSet SystemConfiguration1 = CATIA.SystemConfigurationA = SystemConfiguration1.ProductCount-1ReDim NameArray(A)SystemConfiguration1.GetProductNames NameArrayFor I = 0 to A If SystemConfiguration1.IsProductAuthorized(NameArray(I)) And right(NameArray(I),3) "prd" Then MsgBox "aktive Lizenz: ...
|
| In das Form CATIA V5 Programmierung wechseln |